Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show is gift boolean at order datagrid #4661

Merged
merged 8 commits into from
Feb 12, 2024

Conversation

poulch
Copy link
Member

@poulch poulch commented Feb 5, 2024

What type of PR is this?

  • 💅 Refactor
  • 🌟 Feature
  • 🔥 Bug Fix
  • 🔩 Maintenance
  • 🛠 Workflow CI/CD changes

Related Issues or Documents

Usage Instructions, Screenshots, Recordings

Have you written tests?

  • Yes!
  • No... here is why: Writing tests are mandatory, please replace this text with why test are not included in this PR

[Optional] Description

Copy link

changeset-bot bot commented Feb 5, 2024

🦋 Changeset detected

Latest commit: 86e393c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot temporarily deployed to pr-4661 February 5, 2024 11:50 Destroyed
@github-actions github-actions bot temporarily deployed to storybook pr-4661 February 5, 2024 11:50 Destroyed
@github-actions github-actions bot temporarily deployed to storybook pr-4661 February 7, 2024 09:14 Destroyed
@github-actions github-actions bot temporarily deployed to pr-4661 February 7, 2024 09:14 Destroyed
@poulch poulch changed the title [DO NOT MERGE] Show is gift boolean at order datagrid Show is gift boolean at order datagrid Feb 9, 2024
@poulch poulch marked this pull request as ready for review February 9, 2024 13:40
@poulch poulch requested review from a team, andrzejewsky and Droniu and removed request for a team February 9, 2024 13:40
@github-actions github-actions bot temporarily deployed to storybook pr-4661 February 9, 2024 15:44 Destroyed
@github-actions github-actions bot temporarily deployed to pr-4661 February 9, 2024 15:44 Destroyed
@poulch poulch merged commit c9e36a7 into 4651-gift-reward Feb 12, 2024
13 of 14 checks passed
@poulch poulch deleted the 4656-is-gift-on-datagrid branch February 12, 2024 09:14
poulch added a commit that referenced this pull request Feb 12, 2024
* Update schema

* Add checkout option to add button submenu

* Update rules

* Refactor Condition

* Split model to order and catalog

* Prepare context

* Store condtion type

* Support multiple inputs depend on condition type

* handleOpenModal

* Use rule union

* Fix create object from static methods

* Fix add new rule

* Refactor model

* Use BaseRule type in form

* Update schema and support field with new names

* Filter AddButton submenu by discount type

* Filter add button options by discount type

* Fix showing conditions

* Show saved conditions

* Fix catalog conditions

* Show base rule summary for order rules

* Bump macaw to fix select onChange prop

* Use Rule interface, add OrderRule tests

* Refactor types

* Refactor model

* Update scheme, add type to promotion query

* Handle discount type field

* Bump macaw

* Handle range input

* Fix order rule label on list

* Improve rule summary

* Show option label in summary instead of value

* Rename models

* Refactor rule summary

* Refactor rule summary

* Comment useEnrichConditions, fix validation schema

* Rename hooks, fix tests

* Model refactor

* Fix ts issues

* Fix tests

* Refactor to condition value

* Fix tests

* Remove hooks from context

* Keep hooks close to components

* Pass RuleForm as child

* Last improvments

* Refactor rule model

* Add changeset

* Add discount type component

* Add type to initial form values

* Bump macaw

* Refactor Add button

* Update test

* Refactor DiscountRule isLoaded

* Add type support

* Remve useeffect

* Add changeset

* Extract messages

* Init context

* Context intro

* Remove empty import

* Fix tests, fix useDiscountRulesContext imports

* Add changeset

* Support mutliple condition types

* Update label map after rule add

* Add sorting

* Extract messages

* Add changeset

* Refactor RuleList

* Refactor rule summary to support order conditions

* Update test

* Add changeset

* Update schema

* Changeset add

* Add test to order rule, update catalog rule test, add test ids

* Skeleton

* Generate types

* Enable discount type at create page

* Fix disable type field

* Move RewardPrice

* Handle gifts

* Allow to change discount type at create page

* Update validation schema

* Show gift errors

* Fix reward type slect on change

* Improve data transfrmation

* Improve validation and messages

* Show gift on summary

* Fetch gifts labels

* Clear gifts and reward value when switch reward type

* Some improvemnts, ts fixes,  fix validation schema, format gift labels

* Update storybook, add mocks, update tests

* Add changeset

* Extract messages

* Format variant optipns label

* Add validation when procentage more than 100

* Add empty provider for create page

* Range inputs in one row

* Fix tests

* Redirect ti discount list after submit

* Extract messages

* Add product name to variant labels

* Clear gifts when channel change

* Stop send empty conditions, fix validation

* Add discount type to datagrid

* Fix typo

* Send gifts in separate fields

* Update types

* Refactor useConditionNames

* Handle complex condition in promotion rule (#4667)

* Update playground query

* Update mocks

* Update schema

* Fix caluclate nested conditions

* Prevent predicate send when hasPredicateNestedConditions

* Refactor rule reward

* Stop navigate on details discount form submit

* Improve reward wrapper

* Remove semicolon

* Use undefined instead of null when no gifts

* Show is gift boolean at order datagrid (#4661)

* Add is gift to query

* Add isGift column to order datagrids

* Update fixtures

* Add changeset
@poulch poulch restored the 4656-is-gift-on-datagrid branch July 1, 2024 11:26
@poulch poulch deleted the 4656-is-gift-on-datagrid branch July 1, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants